/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yy.bugzilla.desk.tool;

import com.yy.bugzillahelp.action.BugAction;
import com.yy.bugzillahelp.data.BugDetailData;
import com.yy.bugzillahelp.data.BugStatus;
import com.yy.bugzillahelp.db.BugzillaHelpDB;
import com.yy.bugzillahelp.tool.SQLTool;
import java.sql.Connection;
import java.util.ArrayList;

/**
 *
 * @author hualun-alan
 */
public class BugList131 {

    public static void main(String[] args) {
        Connection con = BugzillaHelpDB.getConnection();
        ArrayList<BugDetailData> datas = BugAction.searchByStatus(con, "2012-12-21 11:29:15", BugStatus.getOpenStatus());
        SQLTool.closeConnection(con);

        ArrayList<BugDetailData> filterDatas = new ArrayList<>();
        for (BugDetailData bugDetailData : datas) {
            if (!bugDetailData.getVersion().contains("12") 
                    && !bugDetailData.getComponent().contains("12")  
                    && !bugDetailData.getProduct().contains("12")  ) {
               filterDatas.add(bugDetailData);
            }
        }

        BugListExport.export(filterDatas);
    }
}
